/* $Id: group.js 115 2011-11-13 10:39:10Z bobcat $ */

var J = jQuery.noConflict();

J(document).ready(function() {
		drawReportBugLink();
		
		J('input[type="text"][class!="ucFormField"]').focus(function() {
			if(J(this).val() == J(this).attr('title')) {
				J(this).val("");
			}
		});
		
		J('input[type="text"][class!="ucFormField"]').blur(function() {
			if(J(this).val() == '') {
				J(this).val(J(this).attr('title'));
			} 
		});
});

/*
 * Email obfuscator script 2.1 by Tim Williams, University of Arizona
 * Random encryption key feature by Andrew Moulden, Site Engineering Ltd
 * This code is freeware provided these four comment lines remain intact
 * A wizard to generate this code is at http://www.jottings.com/obfuscator/
 */
function drawReportBugLink() {
	coded = "36SS.oxoGKa@4QKnq.GxQ"
	key = "WSCBlG2zjVg8xAptvHeNmiruTq0LhPd4b519aDIEsQnZ67cUMfO3woXkRKYyJF"
	shift=coded.length
	link=""
	for (i=0; i<coded.length; i++) {
		if (key.indexOf(coded.charAt(i))==-1) {
			ltr = coded.charAt(i)
			link += (ltr)
		}
		else {		 
			ltr = (key.indexOf(coded.charAt(i))-shift+key.length) % key.length
			link += (key.charAt(ltr))
		}
	}
	J('div.report').html("<a href='mailto:" + link + "?subject=DSC Bug - " + window.location.pathname + window.location.search + "'>Report a Bug</a>")
}
